home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / sticpsrc.lzh / SOURCE.ARC / IFACE.H < prev    next >
Text File  |  1990-07-12  |  2KB  |  38 lines

  1. /* Interface control structure */
  2. struct interface {
  3.     struct interface *next; /* Linked list pointer */
  4.     char *name;        /* Ascii string with interface name */
  5.     int (*ioctl)();        /* Function to handle device control */
  6.     int (*send)();        /* Routine to send an IP datagram */
  7.     int (*output)();    /* Routine to send link packet */
  8.     int (*raw)();        /* Routine to call to send raw packet */
  9.     int (*slipraw)();    /* Routine to send raw slip packet (KISS only) */
  10.     int (*recv)();        /* Routine to kick to process input */
  11.     int (*stop)();        /* Routine to call before detaching */
  12.     struct kiss *kiss;    /* When KISS if: multi-channel def */
  13.     int16 kisschan;        /* When KISS if: channel# this interf. */
  14.     int16 mtu;        /* Maximum transmission unit size */
  15.     int16 dev;        /* Subdevice number to pass to send */
  16.     int16 flags;        /* Configuration flags */
  17. #define IF_CONNECT_MODE 0x01    /* Send datagrams in connected mode */
  18. #define IF_AX25        0x02    /* Interface runs AX.25 */
  19.     int16 trace;        /* Trace flags */
  20. #define IF_TRACE_OUT    0x01    /* Output packets */
  21. #define IF_TRACE_IN    0x10    /* Packets to me except broadcast */
  22. #define IF_TRACE_ASCII    0x100    /* Dump packets in ascii */
  23. #define IF_TRACE_HEX    0x200    /* Dump packets in hex/ascii */
  24.     char *hwaddr;        /* Device hardware address, if any */
  25.     struct interface *forw; /* Forwarding interface for output, if rx only */
  26.     struct nriface *nriface;/* NET/ROM info, when IF avail to NET/ROM */
  27.     struct mheard *heard;    /* List of stations heard */
  28.     struct mheard *lheard;    /* Last entry in heard list */
  29.     int16 nheard;        /* Number of entries in heard list */
  30.     int16 mheard;        /* Number of entries to keep for this iface */
  31. };
  32. #define NULLIF    (struct interface *)0
  33.  
  34. extern struct interface *ifaces;    /* Head of interface list */
  35. extern struct interface *ifunit();    /* find interface by name */
  36. extern struct interface *if_lookup();    /* same without errormsg */
  37.  
  38. ə